package com.manager.controller;


import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.manager.Util.JsonUtils;
import com.manager.pojo.Jdbc;


@Controller
public class DbController {
	@Autowired
	private Jdbc jdbc;

    @RequestMapping("/db")
	@ResponseBody
	public Object getDb(){
    	Jdbc db = new Jdbc();
		BeanUtils.copyProperties(jdbc, db);
		//System.out.println(db.getUsername());
		//System.out.println(db.getDriverClassName());
		return JsonUtils.resultOk(db);
	 
   }
}
